//
//  BaseViewController.m
//  TheRoadAD
//
//  Created by baixue on 16/8/4.
//  Copyright © 2016年 baixue. All rights reserved.
//

#import "BaseViewController.h"
#import "MainTabBarController.h"
#import "HomePageViewController.h"
#import "ActivityViewController.h"
#import "AmodifiedViewController.h"
#import "ClassificationViewController.h"
#import "MineViewController.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

-(void)createTabController
{
    //创建自定制的TabController
    MainTabBarController *tab = [[MainTabBarController alloc]init];
    
    HomePageViewController *vc1 = [[HomePageViewController alloc]init];
    ActivityViewController *vc2 = [[ActivityViewController alloc]init];
    AmodifiedViewController *vc3 = [[AmodifiedViewController alloc]init];
    ClassificationViewController *vc4 = [[ClassificationViewController alloc]init];
     MineViewController *vc5 = [[MineViewController alloc]init];
    NSArray *viewControllers = @[vc1,vc2,vc3,vc4,vc5];
    //设置TabController管理的视图数组
    tab.viewControllers = viewControllers;
    
    //创建一个导航控制器，根视图为tab
    UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:tab];
    
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
